<?php
$baseUrl = Yii::app()->request->baseUrl . '/';
$isHome = Yii::app()->controller->getRoute() == Yii::app()->defaultController ? true : false;
$region = $this->getRegion();
?>
<!DOCTYPE html>                                             
<html lang="en">
    <head>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
        <meta name="author" content=""/>
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <link rel="stylesheet" href="<?php echo $baseUrl; ?>css/main.css" media="all"/>
        <!--<link href="<?php //echo $baseUrl;           ?>css/jquery.rating.css" type="text/css" rel="stylesheet">-->
        <!--[if IE 8]><link href="css/ie8.css" rel="stylesheet" type="text/css" media="all"/><![endif]-->
        <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
        <link href="<?php echo $baseUrl; ?>favicon.ico" rel="shortcut icon"/>
        <!-- jQuery library -->
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery-ui.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/numeral.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.yiiactiveform.js"></script>
        <!--<script type="text/javascript" src="<?php //echo $baseUrl;           ?>js/jquery.rating.js"></script>-->
    </head>                     

    <body class="main">
        <!-- wrapper Start -->
        <div class="wrapper">
            <!-- header Start -->
            <header class="header">                
                <?php $this->widget('widgets.Header.TopPanel'); ?>
                <?php $this->widget('widgets.Header.MiddlePanel'); ?>
                <?php $this->widget('widgets.Header.BottomPanel'); ?>
                <?php if ($isHome) $this->widget('widgets.Header.PromoSlider'); ?>
            </header>  
            <!-- header end -->
            <!-- page Start -->
            <div class="page-content">
                <div class="page__inner">
                    <?php $this->widget('widgets.Content.BreadCrumbs'); ?>
                    <div<?php
                    if ($isHome || $this->filterPages())
                        echo ' class="page__indent-right"';
                    else
                        echo ' class="page__inner__columns"';
                    ?>>
                            <?php echo $content; ?> 
                            <?php if ($isHome) $this->widget('widgets.Tabs.InfoTabs'); ?>
                    </div> 
                    <?php if ($this->filterPages()) $this->widget('widgets.Content.Filter'); ?>      
                    <?php if ($isHome) $this->widget('widgets.Articles.LastNews'); ?>
                    <div class="specialist-consultation">
                        <dl>
                            <dt>Нуждаетесь в консультации специалиста?</dt>
                            <dd>
                                <a href="#callback" class="specialist-consultation__button show-popup">Закажите обратный звонок!</a>
                            </dd>
                        </dl>
                    </div>  
                </div>  
            </div>
            <!-- page end -->
        </div>
        <!-- wrapper end -->
        <!-- fotoer Start -->
        <footer class="footer">
            <ul class="footer__list">
                <li class="footer__list__item">
                    <div class="footer__logo">
                        <span>Mspares.ru</span>
                    </div>
                </li>
                <li class="footer__list__item">
                    <nav class="footer__navi">
                        <ul>
                            <li>
                                <a href="#">Компания</a>
                            </li>
                            <li>
                                <a href="#">Доставка</a>
                            </li>
                            <li>
                                <a href="#">Оплата и гарантия</a>
                            </li>
                            <li>
                                <a href="#">Контаты</a>
                            </li>
                        </ul>
                    </nav>
                </li>
                <li class="footer__list__item">
                    <div class="select-city">
                        <span class="select-city__link">
                            <span><a href="#region" style="color: #FFF; text-decoration: none;" class="show-popup"><?php echo $region['regionTitle']; ?></a></span>
                        </span>                                               
                    </div>
                    <div class="contact-info">
                        <div class="contact-info__inner">
                            <address>
                                <span>8 (495) 988-0-911</span>
                            </address>
                            <div class="contact-info__sub-navi">
                                <ul>
                                    <li class="contact-info__sub-navi__order-call">
                                        <a class="show-popup" href="#callback">Закажите звонок</a>
                                    </li>
                                    <li class="contact-info__sub-navi__consultant">
                                        <a href="#">Онлайн консультант</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </li> 
                <li class="footer__list__item">
                    <a href="#" class="development">Brander</a>
                </li> 
            </ul>    
        </footer>
        <div id="_product_search_" style="display: none;" class="nal">
            <div class="search-result__corn st">&nbsp;</div>
            <ul>
                <li id="serch-r-cnt">В наличии 53 шт.</li>
            </ul>
        </div>
        <?php $this->widget('widgets.Content.Region'); ?>
        <!-- fotoer end -->
        <!-- global-popup Start -->
        <?php $this->widget('widgets.Forms.Authorization'); ?>
        <?php $this->widget('widgets.Forms.Callback'); ?>
        <?php $this->widget('widgets.Forms.OneClick'); ?>

        <!-- global-popup end -->        
        <!-- jQuery Plugin scripts -->
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.easing.1.3.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.mousewheel.js"></script>
        <!-- jQuery scripts -->
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.sliderkit.1.9.2.pack.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.ui-slider.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/jquery.core-ui-select.js"></script>
        <script src="<?php echo $baseUrl; ?>js/jquery.scrollbar.min.js"></script>
        <script src="<?php echo $baseUrl; ?>js/placeholder.js"></script>
        <script src="<?php echo $baseUrl; ?>js/jquery.cookie.js"></script>
        <script src="<?php echo $baseUrl; ?>js/jquery.maskedinput.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>js/scripts.js"></script>
        <?php if (Yii::app()->user->hasFlash('success')): ?>
            <script>msgBox('Поздравляем.', '<?php echo Yii::app()->user->getFlash('success'); ?>');</script>
        <?php endif; ?>
    </body>

</html>                         